import {
  SET_TOKEN,
  SET_USER,
  DEL_USER,
  NO_READ,
  SET_MENULIST
} from './mutation-types'
export default {
  // 设置token
  [SET_TOKEN](state, token) {
    state.token = token
  },
  // 设置用户信息
  [SET_USER](state, user) {
    state.user = user
  },
  // 删除用户信息
  [DEL_USER](state, user) {
    state.user = {}
  },
  // 设置菜单栏
  [SET_MENULIST](state, menuList) {
    state.menuList = menuList
  },
  //未读消息
  [NO_READ](state, num) {
    state.noReadNum = num
  }
}